package com.apartment.common.config;

import com.github.dreamyoung.mprelation.AutoMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class AutoMapperConfig {
    @Bean
    public AutoMapper autoMapper(@Autowired(required=false) ApplicationContext applicationContext) {

        //配置ApplicationContext及实体类所在包
        return new AutoMapper(new String[] {"com.apartment.own.response.bill"});
    }
}